SHELL = /bin/bash
PWD = $(shell pwd)
NOW = $(shell date)
UNAME = $(shell uname)
LIBPATH = build/lib
CXXFLAGS = -g -DWX_PRECOMP -Wall -Wundef -Wno-ctor-dtor-privacy -fno-strict-aliasing -static-libgcc -static-libstdc++

ifndef DISK
DISK=build
endif

all:
	mkdir -p $(DISK)/{bin,docs,examples,include,lib} \

	g++ $(CXXFLAGS) \
    `wx-config --cppflags` \
    src/GrMPEApp.cpp \
    src/GrMPEFrame.cpp \
    src/MPEPanel.cpp \
    src/FileGrid.cpp \
    src/OperatingModelPanel.cpp \
    src/PopulationSizePanel.cpp \
    src/SurveyParametersPanel.cpp \
    src/LifeHistoryPanel.cpp \
    src/AtAgePanel.cpp \
    src/EntryPanel.cpp \
    `wx-config --libs` -o $(DISK)/bin/grmpe \

	cp examples/*.* $(DISK)/examples
	cp examples/Example.mpe $(DISK)/examples \

test-OS:
	echo $(UNAME)

clean:
	rm -r $(DISK)
